package phoenix.web.locators.maturedating;

import org.openqa.selenium.By;
import phoenix.web.locators.base.MyProfileLocatorsBase;

/**
 * Created by AlexGolovko on 01.12.2014.
 */
public class MyProfileLocators extends MyProfileLocatorsBase
{
	public MyProfileLocators()
	{
		txtScreenname = By.xpath("//h1[@class='b-screenname']");
		//
		txtDescription = By.xpath("//textarea[@id='status']");
		blockPrimaryPhoto = By.xpath("//div[@class='photo-item single-photo']");
		btnSaveLookingFor = By.xpath("//button[@class='btn-save btn-text-green']");
		selectLookingGender = By.xpath("//div[@id='profileLookingFor']/div/ul/li/div/div[2]/div");

		selectLookingAgeTo = By.xpath("//div[@data-select-min='searchFormAgeFrom']/div");
		selectLookingAgeFrom = By.xpath("//div[@data-select-max='searchFormAgeTo']/div");
		txtLookingLocation = By.xpath("//input[@name='lookingForLocation']");
		selectLookingDistance = By.xpath("//div[@id='profileLookingFor']/div/ul/li/div[4]/div[2]/div");
		btnSaveLookingForInfo = By.xpath("//button[@class='btn-save btn-text-green']");

		btnEditLookingForInfo = By.xpath("//button[@data-tab-for='profileLookingFor']");
		btnEditLookingFor = btnEditLookingForInfo;

		// DOB
		selectDay = By.xpath("//div[@id='profileEditor']/div[5]/div[2]/div/div/div/div");
		selectMonth = By.xpath("//div[@id='profileEditor']/div[5]/div[2]/div/div[2]/div/div");
		selectYear = By.xpath("//div[@id='profileEditor']/div[5]/div[2]/div/div[3]/div/div");

		txtLocation = By.xpath("//input[@name='location']");

		btnSaveMainInfo = By.xpath("//button[@class='btn-save btn-text-green']");

		//
		btnEditPersonalInfo = By.xpath("//button[@data-tab-for='profileDetails']");
		btnSavePersonalInfo = By.xpath("//button[@class='btn-save btn-text-green']");

		selectOrientation = By.xpath("//div[@id='profileDetails']/div/div[1]/div/div/div[@class='value']");
		selectMaritalStatus = By.xpath("//div[@id='profileDetails']/div/div[2]/div/div/div[@class='value']");
		selectChildren = By.xpath("//div[@id='profileDetails']/div/div[3]/div/div/div[@class='value']");
		selectLiving = By.xpath("//div[@id='profileDetails']/div/div[4]/div/div/div[@class='value']");
		selectEthnicOrigin = By.xpath("//div[@id='profileDetails']/div/div[5]/div/div/div[@class='value']");
		selectReligion = By.xpath("//div[@id='profileDetails']/div/div[6]/div/div/div[@class='value']");
		selectHeight = By.xpath("//div[@id='profileDetails']/div/div[7]/div/div/div[@class='value']");
		selectWeight = By.xpath("//div[@id='profileDetails']/div/div[8]/div/div/div[@class='value']");
		selectBodyType = By.xpath("//div[@id='profileDetails']/div/div[9]/div/div/div[@class='value']");
		selectHairColor = By.xpath("//div[@id='profileDetails']/div/div[10]/div/div/div[@class='value']");
		selectEyesColor = By.xpath("//div[@id='profileDetails']/div/div[11]/div/div/div[@class='value']");
		selectTattoo = By.xpath("//div[@id='profileDetails']/div/div[12]/div/div/div[@class='value']");
		selectPircing = By.xpath("//div[@id='profileDetails']/div/div[13]/div/div/div[@class='value']");
		selectSmoke = By.xpath("//div[@id='profileDetails']/div/div[14]/div/div/div[@class='value']");
		selectDrink = By.xpath("//div[@id='profileDetails']/div/div[15]/div/div/div[@class='value']");
		selectEducation = By.xpath("//div[@id='profileDetails']/div/div[16]/div/div/div[@class='value']");
		selectIncome = By.xpath("//div[@id='profileDetails']/div/div[17]/div/div/div[@class='value']");

		// Photo
		blockPhotoUploader = By.xpath("//form[@id='ProfilePhotoUploadForm']");
		btnRemovePhoto = By.cssSelector("button.btn-close");
	}

	/**
	 * MatureDating MyProfile related
	 */

	@Override
	public By selectGender(String p_value)
	{
		return By.xpath("//ul/li/div/div[2]/div[2]/ul/li[@data-item='" + p_value + "']");
	}

	@Override
	public By selectRadius(String p_value)
	{
		return By.xpath("//ul/li/div[4]/div[2]/div[2]/ul/li[@data-item='" + p_value + "']");
	}

	@Override
	public By setLocatorByValue(String p_value, By p_baseLocator)
	{
		return By.xpath(p_baseLocator.toString().replace("By.xpath: ", "") + "//ul/li[@data-item='" + p_value + "']");
	}

	@Override
	public By getListLocator(By p_parentLocator, String p_value)
	{
		return By.xpath(p_parentLocator.toString().replace("By.xpath: ", "") + "/*//ul/li[@data-item='" + p_value + "']");
	}

	@Override
	public By dropDownLocator(By p_parentLocator, String p_value)
	{
		return By.xpath(p_parentLocator.toString().replace("By.xpath: ", "").replace("value", "select") + "//ul/li[contains(text(),'" + p_value + "')]");
	}
}
